<?php
session_start();
date_default_timezone_set("Asia/Jakarta");
require_once '../koneksi/koneksi.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title><?php echo MAINSITENAME;?></title>
  <link rel="shortcut icon" href="<?php echo BASEURL;?>image/pavicon.png" />
  <link rel="stylesheet" type="text/css" href="<?php echo BASEURL;?>css/index.css" />
  <link rel="stylesheet" type="text/css" href="<?php echo BASEURL;?>css/ikon.css" />
  <script type="text/javascript" src="<?php echo BASEURL;?>javascript/jquery-1.9.0.js"></script>
  <script type="text/javascript" src="<?php echo BASEURL;?>javascript/jquery.validate.js"></script>
  <script type="text/javascript" >
      var baseUrl  = '<?php echo BASEURL;?>';
      var baseUrlAdmin  = '<?php echo BASEURLADMIN;?>';
  </script>
</head>

<body style="background-color:silver">
  <div id="line">&nbsp;</div>
  <div id="header">
   <div class="frame_header_atas">
     <div class="logo"><a class="logo-site-name" href="<?php echo BASEURLADMIN; ?>"><?php echo MAINSITENAME; ?>
     </a></div>
     <div style="<?php echo isset($_SESSION['adminlogin'])?"":"display:none"; ?>" class="frame_login">
       <div class="link_login">&nbsp;</div>
       <div class="keterangan">Anda Masuk Sebagai <a href="<?php echo BASEURLADMIN; ?>?v=user&p=myprofile"><?php echo $_SESSION['adminlogin']['nama'] ?></a> | <a href="<?php echo BASEURL; ?>proses/administrasi.php?on=logout">Log Out</a></div>
     </div>
   </div>
   <div class="frame_header_bawah">
     <a href="<?php echo BASEURLADMIN; ?>"><div class="menu_navigasi">Home</div></a>
     <a href="<?php echo BASEURLADMIN; ?>index.php?v=master"><div class="menu_navigasi">Data Master</div></a>
     <a href="<?php echo BASEURLADMIN; ?>index.php?v=transaksi"><div class="menu_navigasi">Transaksi</div></a>
     <a href="<?php echo BASEURLADMIN; ?>index.php?v=customer"><div class="menu_navigasi">Customer</div></a>
     <a href="<?php echo BASEURLADMIN; ?>index.php?v=user"><div class="menu_navigasi">My Profile</div></a>
     <a href="<?php echo BASEURLADMIN; ?>index.php?v=report"><div class="menu_navigasi">Laporan</div></a>
     <!--div class="search">
       <table width="100%" cellpadding="2" cellspacing="0" border="0">
         <tr>
           <td width="85%"><input type="text" name="search" id="search" class="text_box" /></td>
           <td width="15%"><img src="<?php echo BASEURL;?>image/ico search.png" /></td>
         </tr>
       </table>
     </div-->
   </div>
 </div>

 <div id="center">
  <?php 
  if(isset($_SESSION['adminlogin']) && is_array($_SESSION['adminlogin']) && count($_SESSION['adminlogin'])>4){


  $v=isset($_GET['v'])?$_GET['v']:'';
  if(strlen($v)>0 && file_exists( $v.'.php')){
    include_once($v.'.php');
  }
  else if($v==''){
      include_once('main.php');
  }
  else{
      include_once('no_page.php');
  }
}
else{
  include_once('loginAdmin.php');
}
  ?>
</div>

<div id="line_footer">&nbsp;</div>
<div id="footer">
  <div id="line_footer_2">
  ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
  <div class="frame_footer_2">&copy; <?php echo YEARCOPYRIGHT; ?> <strong><?php echo MAINSITENAME;?></strong> ALL RIGHTS RESERVED</div>
</div>
</body>
</html>
